<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div id="info"></div>
</body>

<script type="text/javascript" src="./jquery-1.8.2.min.js"></script>
<script>
    $(function () {
        setTimeout("timeout()", 2000);
        $("#info").html("after setTimeout");
    });
    var timeout = function() {
        $("#info").html("timeout");
    }

</script>
</html>